package com.shangxia.common.util;

import com.sun.javaws.Globals;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import java.net.UnknownHostException;
import java.util.Properties;

/**
 * @author zhouya38158
 * @Package com.shangxia.common.util
 * @date 2021/11/1 13:53
 */
@Component
public class RedisUtil {



    @Autowired
    public RedisTemplate<String, Object> redisTemplate;


    @PostConstruct
    public void init() {
        if (null == redisTemplate) {
            System.out.println("redis error");
        } else {
            System.out.println(redisTemplate);
        }
    }
}
